class CommentsController < ApplicationController
	
    
    def index
      @comment = Comment.new
      
    end

    def create
     @comment = Comment.new(params[:comments])
     @comment.save
     redirect_to @comment
    end

    def show
     @comment = Comment.find(params[:id])
    end

    def update
     redirect_to @comment
    end
 

    def destroy
     @comment = Comment.find(params[:id])
     @comment.destroy
     redirect_to comments_url
    end
end
